package com.jml.装饰模式;

public class Main {

    public static void main(String[] args) {
        IPacketCreator packetCreator = new PacketHtmlHanderCreator(
                new PacketHtmlHanderCreator(new PacketBodyCreator()));
        System.out.println(packetCreator.handleContent());
        System.out.println("--------------------------");
        IPacketCreator packetCreator1 = new PacketBodyCreator();
        System.out.println(packetCreator1.handleContent());

        IPacketCreator packetCreator2 = new PacketHtmlHanderCreator(packetCreator1);
        System.out.println(packetCreator2.handleContent());

        IPacketCreator packetCreator3 = new PacketHtmlHanderCreator(packetCreator2);
        System.out.println(packetCreator3.handleContent());

        IPacketCreator packetCreator4 = new PacketHtmlHanderCreator(packetCreator3);
        System.out.println(packetCreator4.handleContent());

    }
}
